Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 1332 One-Two-Three solution in c

 uri 1332 solution in c

by ujjal roy




#include<stdio.h>


main()

{

    int n;

    scanf("%d",&n);

    while(n--)

    {

       char s[101];

         scanf("%s",s);

        int l=strlen(s);

        if(l==5)printf("3\n");

        else

        {

            if((s[0]=='o'&&s[1]=='n')||(s[0]=='o'&&s[2]=='e')||(s[2]=='e'&&s[1]=='n')) printf("1\n");

            else printf("2\n");

        }

    }


    return 0;

}


Post a Comment

0 Comments